home *** CD-ROM | disk | FTP | other *** search
/ MACD 5 / MACD 5.bin / workbench / libs / maestixlib.lha / Maestix / include / libraries / maestix.h next >
C/C++ Source or Header  |  1995-06-26  |  7KB  |  207 lines

  1. /*
  2. **      Maestix Library References  -  V38
  3. **
  4. **      © 1995 Richard Körber
  5. */
  6.  
  7. #ifndef LIBRARIES_MAESTIX_H
  8. #define LIBRARIES_MAESTIX_H    (1)
  9.  
  10. #ifndef EXEC_TYPES_H
  11. #include 'exec/types.h'
  12. #endif
  13.  
  14. #ifndef UTILITY_TAGITEM_H
  15. #include 'utility/tagitem.h'
  16. #endif
  17.  
  18. #ifndef EXEC_PORTS_H
  19. #include 'exec/ports.h'
  20. #endif
  21.  
  22. #ifndef EXEC_LISTS_H
  23. #include 'exec/lists.h'
  24. #endif
  25.  
  26. #ifndef EXEC_LIBRARIES_H
  27. #include 'exec/libraries.h'
  28. #endif
  29.  
  30.  
  31. /* ------------------------------------------------------------------------ */
  32. /*  Generic library informations */
  33.  
  34.  
  35. #define MAESTIXVERSION    (39)
  36.  
  37. struct MaestixBase {
  38.     struct    Library mxb_LibNode;
  39. };
  40.  
  41.  
  42. /* ------------------------------------------------------------------------ */
  43. /*  MaestroBase structure */
  44.  
  45. struct MaestroBase {
  46.     WORD    maba_Dummy;    /* PRIVATE */
  47. };
  48.  
  49.  
  50. /* ------------------------------------------------------------------------ */
  51. /*  DataMessage */
  52.  
  53. struct DataMessage {
  54.     struct    Message dmn_Message;    /* struct Message */
  55.     APTR    dmn_BufPtr;    /* pointer to public buffer memory */
  56.     ULONG    dmn_BufLen;    /* length of buffer memory (bytes) */
  57. };
  58.  
  59.  
  60. /* ------------------------------------------------------------------------ */
  61. /*  Tag definitions */
  62.  
  63. #define _MSTXTAG    (0xCD414553)    /* Maestix tag base ("MAES") */
  64.  
  65. /*  SetMaestro() tags */
  66.  
  67. #define MTAG_Input    (_MSTXTAG+0x00)    /* Input? Def. INPUT_STD */
  68. #define MTAG_Output    (_MSTXTAG+0x01)    /* Output? Def. OUTPUT_BYPASS */
  69. #define MTAG_SetCSB    (_MSTXTAG+0x02)    /* Direct CSB access */
  70. #define MTAG_SetUDB    (_MSTXTAG+0x03)    /* Direct UDB access */
  71. #define MTAG_Studio    (_MSTXTAG+0x04)    /* Studio mode? (TRUE/FALSE) */
  72. #define MTAG_CopyProh    (_MSTXTAG+0x05)    /* Copy protection? */
  73. #define MTAG_Emphasis    (_MSTXTAG+0x06)    /* Emphasis */
  74. #define MTAG_Source    (_MSTXTAG+0x07)    /* Source category code */
  75. #define MTAG_Rate    (_MSTXTAG+0x08)    /* Output rate */
  76. #define MTAG_Validity    (_MSTXTAG+0x09)    /* Validity flag (TRUE/FALSE) */
  77. #define MTAG_ResetUDB    (_MSTXTAG+0x0A)    /* Reset UDB */
  78. #define MTAG_ResetLSA    (_MSTXTAG+0x0C)    /* Reset Local Sample Address */
  79.  
  80. /*  StartRealtime() tags */
  81.  
  82. #define MTAG_Effect    (_MSTXTAG+0x0D)    /* effect number (see below) */
  83. #define MTAG_A0    (_MSTXTAG+0x0E)    /* parameter -> A0 */
  84. #define MTAG_A1    (_MSTXTAG+0x0F)    /* parameter -> A1 */
  85. #define MTAG_D2    (_MSTXTAG+0x10)    /* parameter -> D2 */
  86. #define MTAG_D3    (_MSTXTAG+0x11)    /* parameter -> D3 */
  87. #define MTAG_CustomCall    (_MSTXTAG+0x12)    /* pointer to custom call */
  88.  
  89.  
  90. /* ------------------------------------------------------------------------ */
  91. /*  Tag values for MTAG_Input */
  92.  
  93. #define INPUT_STD    (0)    /* User selected input */
  94. #define INPUT_OPTICAL    (1)    /* optical input */
  95. #define INPUT_COAXIAL    (2)    /* coaxial input */
  96. #define INPUT_SRC48K    (3)    /* 48kHz internal source */
  97.  
  98.  
  99. /* ------------------------------------------------------------------------ */
  100. /*  Tag values for MTAG_Output */
  101.  
  102. #define OUTPUT_BYPASS    (0)    /* Bypass */
  103. #define OUTPUT_INPUT    (1)    /* from input */
  104. #define OUTPUT_FIFO    (2)    /* from FIFO */
  105.  
  106.  
  107. /* ------------------------------------------------------------------------ */
  108. /*  Tag values for MTAG_CopyProh */
  109.  
  110. #define CPROH_OFF    (0)    /* No protection requested */
  111. #define CPROH_ON    (1)    /* Copy protection requested */
  112. #define CPROH_PROHIBIT    (2)    /* Copy prohibited */
  113. #define CPROH_INPUT    (3)    /* As input */
  114.  
  115.  
  116. /* ------------------------------------------------------------------------ */
  117. /*  Tag values for MTAG_Emphasis */
  118.  
  119. #define EMPH_OFF    (0)    /* no emphasis */
  120. #define EMPH_50us    (1)    /* 50/15µs */
  121. #define EMPH_CCITT    (2)    /* CCITT J.17 (studio only) */
  122. #define EMPH_MANUAL    (3)    /* Manuell (studio only) */
  123. #define EMPH_INPUT    (4)    /* As input */
  124. #define EMPH_ON    (EMPH_50us)
  125.  
  126.  
  127. /* ------------------------------------------------------------------------ */
  128. /*  Tag values for MTAG_Source */
  129.  
  130. #define SRC_INPUT    (0)    /* As input */
  131. #define SRC_CD    (0x01)    /* CD */
  132. #define SRC_DAT    (0x03)    /* DAT */
  133. #define SRC_DSR    (0x0C)    /* DSR */
  134. #define SRC_ADCONV    (0x06)    /* ADC */
  135. #define SRC_INSTR    (0x05)    /* Instrument */
  136.  
  137.  
  138. /* ------------------------------------------------------------------------ */
  139. /*  Tag values for MTAG_Rate */
  140.  
  141. #define RATE_32000    (0)    /* Rate 32000 Hz */
  142. #define RATE_44100    (1)    /* Rate 44100 Hz */
  143. #define RATE_48000    (2)    /* Rate 48000 Hz */
  144. #define RATE_48000MANU    (3)    /* Rate 48000 Hz Manual */
  145. #define RATE_INPUT    (4)    /* As input */
  146.  
  147.  
  148. /* ------------------------------------------------------------------------ */
  149. /*  Realtime FX codes */
  150.  
  151. #define RFX_Muting    (0)    /* mute incoming signal */
  152. #define RFX_Bypass    (1)    /* no manipulation (default) */
  153. #define RFX_ChannelSwap    (2)    /* swap left and right */
  154. #define RFX_LeftOnly    (3)    /* mute right channel */
  155. #define RFX_RightOnly    (4)    /* mute left channel */
  156. #define RFX_Mono    (5)    /* mono */
  157. #define RFX_Surround    (6)    /* surround */
  158. #define RFX_Volume    (7)    /* volume */
  159.                 /* MTAG_D2: left volume (0..256) */
  160.                 /* MTAG_D3: right volume (0..256) */
  161. #define RFX_Karaoke    (8)    /* filters out the singer */
  162. #define RFX_Foregnd    (9)    /* filters out the surround info */
  163. #define RFX_Spatial    (10)    /* virtual shifting of the speakers */
  164.                 /* MTAG_D2: shift factor (0..256) */
  165.                 /*          optimum: about 64 */
  166. #define RFX_Echo    (11)    /* echo effect */
  167.                 /* MTAG_D2: entry volume (0..256) */
  168.                 /* MTAG_D3: decay volume (0..256) */
  169.                 /* MTAG_A0: pointer to MRTorus structure */
  170. #define RFX_Mask    (12)    /* mask/quantisize */
  171.                 /* MTAG_D2: left mask word */
  172.                 /* MTAG_D3: right mask word */
  173. #define RFX_Offset    (13)
  174.                 /* MTAG_D2: left offset (32767..-32768) */
  175.                 /* MTAG_D3: right offset (32767..-32768) */
  176.  
  177. /* ------------------------------------------------------------------------ */
  178. /*  Torus structure for RFX_Echo */
  179.  
  180. struct MRTorus {
  181.     APTR    mrtor_PointerL;    /* Pointer to left data buffer */
  182.     APTR    mrtor_PointerR;    /* Pointer to right data buffer */
  183.     ULONG    mrtor_Size;    /* Size of these buffers (bytes) */
  184.     ULONG    mrtor_Offset;    /* current offset (init with NULL) */
  185. };
  186.  
  187. /* ------------------------------------------------------------------------ */
  188. /*  GetStatus() values */
  189.  
  190. #define MSTAT_TFIFO    (0)    /* Transmit FIFO Status    (s.b.) */
  191. #define MSTAT_RFIFO    (1)    /* Receive FIFO Status     (s.b.) */
  192. #define MSTAT_Signal    (2)    /* Signal on input?        (BOOL) */
  193. #define MSTAT_Emphasis    (3)    /* Signal uses emphasis?   (BOOL) */
  194. #define MSTAT_DATsrc    (4)    /* DAT-Source?             (BOOL) */
  195. #define MSTAT_CopyProh    (5)    /* Copy protection?        (BOOL) */
  196. #define MSTAT_Rate    (6)    /* Rate                    (ULONG) */
  197. #define MSTAT_UDB    (7)    /* get current UDB         (UBYTE) */
  198.  
  199. /*  Values for TFIFO & RFIFO */
  200.  
  201. #define FIFO_Off    (0)    /* FIFO ist aus */
  202. #define FIFO_Running    (1)    /* FIFO läuft */
  203. #define FIFO_Error    (2)    /* FIFO lief über */
  204.  
  205. #endif
  206.  
  207.